<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%> 
<html>
<head>  
  <script type="text/javascript">
  function addMenu(url){	  
	  commonDetail(url,"save","menuTableId");
  }
  function modifyMenu(url){	  
	  commonDetail(url,"update","menuTableId");
  }
  function deleteMenu(url){	  
	  commonDel(url,"delete","menuTableId");
  }
  </script>
</head>
<body class="easyui-layout list_body">
<form id="menuForm" name="menuForm" >
	<div class="list_body_north" data-options="region:'north'" border="false">
	 	<!-- 查询表单 -->
	 	<div  class="datagrid-toolbar" border="false"  >
				<span>菜单名称:</span>
				<input type="text" id="menu_name" name="menu_name"  class="easyui-textbox" />
			 	<a href="#" class="easyui-linkbutton btn" iconCls="icon-search" onclick="doSearch()">查询</a>
			 	<a href="#" class="easyui-linkbutton btn" iconCls="icon-reload" onclick="resetForm()">重置</a>
		</div>
		<!-- 自定义标签工具栏 -->
		<jiepos:buttonOperateTag menuCode="${menuCode}"></jiepos:buttonOperateTag>
	</div>
	<div data-options="region:'center'" border="false" class="list_body_center">
		<!-- 表格 -->
	    <table id="menuTableId" fit="true"></table>
    </div>
</form>
</body>
<script type="text/javascript">
	var grid;
	$(function(){
		/*加载表格数据*/
		grid = $("#menuTableId").jpgrid({
			url: "getMenuListJson.do",
			columns: [
				{title: "菜单名称", field: "MENU_NAME", width: 150},
				{title: "链接地址", field: "MENU_URL", width: 400},
				{title: "上级菜单", field: "MENUPNAME", width: 90},
				{title: "菜单排序值", field: "MENU_ORDERS", width: 70},
				{title: "备用列表链接1", field: "MENU_URL1", width: 420},
				{title: "备用列表链接2", field: "MENU_URL2", width: 380}
			]
		});
	});
	
	function doSearch(){ 
		grid.load({menu_name: $('#menu_name').val()});
	}
</script>
</html>
